package com.evil.application.pojo.dto.order.es;

import com.evil.application.pojo.entity.ApplicationInfo;
import com.evil.application.pojo.entity.ApplicationOrder;
import com.evil.common.application.dto.order.data.ControlDataDTO;
import com.evil.common.es.dto.application.order.node.ESNodeHandlerDTO;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 批量保存es订单
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
public class SaveESOrderDTO {

    @NotNull(message = "app not null")
    private ApplicationInfo app;

    @NotNull(message = "order not null")
    private ApplicationOrder order;

    @NotEmpty(message = "data nor empty")
    private List<ControlDataDTO> data;

    private List<ESNodeHandlerDTO> nodeHandlers;

    public SaveESOrderDTO() {
        this.nodeHandlers = new ArrayList<>();
    }
}
